package com.fitness.fitness.modal.member.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fitness.fitness.modal.AbstractBaseEntity;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.Date;

@Data
@TableName("t_member")
public class Member extends AbstractBaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    private Long userId;

    private String realName;

    //会员性别,1为男，0为女")
    private String gender;

    private Integer age;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date birthday;

    //会员身高
    private Integer height;

    //会员体重
    private Integer weight;

    private String avatar;

//    public Member(String username, String password, String mobile) {
//        this.username = username;
//        this.password = password;
//        this.mobile = mobile;
//        this.nickName = username;
//        this.disabled = true;
//        this.haveStore = false;
//        this.sex = 0;
//        this.point = 0L;
//        this.totalPoint = 0L;
//        this.lastLoginDate = new Date();
//    }
//
//    public Member(String username, String password, String avatar, String nickName, Integer gender,String mobile) {
//        this.username = username;
//        this.password = password;
//        this.mobile = mobile;
//        this.nickName = nickName;
//        this.disabled = true;
//        this.avatar = avatar;
//        this.gender = gender;
//    }
}
